namespace ext.grid
{
	using System;
	using System.Runtime.CompilerServices;
	using System.Html;
	using System.Collections;
	
	
	/// <summary>
	/// This class extends the {@link Ext.grid.GridPanel GridPanel Class} to provide cell editing
	/// on selected {@link Ext.grid.Column columns}. The editable columns are specified by providing
	/// an {@link Ext.grid.ColumnModel#editor editor} in the {@link Ext.grid.Column column configuration}.  Editability of columns may be controlled programatically by inserting an implementation
	/// of {@link Ext.grid.ColumnModel#isCellEditable isCellEditable} into the
	/// {@link Ext.grid.ColumnModel ColumnModel}.  Editing is performed on the value of the field specified by the column&apos;s
	/// {@link Ext.grid.ColumnModel#dataIndex dataIndex} in the backing {@link Ext.data.Store Store}
	/// (so if you are using a {@link Ext.grid.ColumnModel#setRenderer renderer} in order to display
	/// transformed data, this must be accounted for).  If a value-to-description mapping is used to render a column, then a {@link Ext.form.Field#ComboBox ComboBox}
	/// which uses the same {@link Ext.form.Field#valueField value}-to-{@link...
	/// </summary>
	/// <htmlSummary>
	/// &lt;p&gt;This class extends the {@link Ext.grid.GridPanel GridPanel Class} to provide cell editing
	/// on selected {@link Ext.grid.Column columns}. The editable columns are specified by providing
	/// an {@link Ext.grid.ColumnModel#editor editor} in the {@link Ext.grid.Column column configuration}.&lt;/p&gt;
	/// &lt;p&gt;Editability of columns may be controlled programatically by inserting an implementation
	/// of {@link Ext.grid.ColumnModel#isCellEditable isCellEditable} into the
	/// {@link Ext.grid.ColumnModel ColumnModel}.&lt;/p&gt;
	/// &lt;p&gt;Editing is performed on the value of the &lt;i&gt;field&lt;/i&gt; specified by the column&apos;s
	/// &lt;tt&gt;{@link Ext.grid.ColumnModel#dataIndex dataIndex}&lt;/tt&gt; in the backing {@link Ext.data.Store Store}
	/// (so if you are using a {@link Ext.grid.ColumnModel#setRenderer renderer} in order to display
	/// transformed data, this must be accounted for).&lt;/p&gt;
	/// &lt;p&gt;If a value-to-description mapping is used to render a column, then a {@link Ext.form.Field#ComboBox ComboBox}
	/// which uses the same {@link Ext.form.Field#valueField value}-to-{@link Ext.form.Field#displayFieldField description}
	/// mapping would be an appropriate editor.&lt;/p&gt;
	/// If there is a more complex mismatch between the visible data in the grid, and the editable data in
	/// the {@link Edt.data.Store Store}, then code to transform the data both before and after editing can be
	/// injected using the {@link #beforeedit} and {@link #afteredit} events.
	/// </htmlSummary>
	/// <definedin>src\widgets\grid\EditorGrid.js</definedin>
	[ScriptName("EditorGridPanel")]
	[ScriptNamespace("Ext.grid")]
	[Imported()]
	public partial class EditorGridPanel : ext.grid.GridPanel
	{
		
		#region Constructors
		/// <summary>Constructor</summary>
		/// <param name="config">The config object</param>
		public EditorGridPanel(ext.grid.EditorGridPanel_Configuration config)
		{
		}
		
		/// <summary>Constructor</summary>
		public EditorGridPanel()
		{
		}
		#endregion
		
		#region Fields
		/// <summary>
		/// The number of clicks on a cell required to display the cell&apos;s editor (defaults to 2).  Setting this option to &apos;auto&apos; means that mousedown on the selected cell starts
		/// editing that cell.
		/// </summary>
		/// <htmlSummary>
		/// &lt;p&gt;The number of clicks on a cell required to display the cell&apos;s editor (defaults to 2).&lt;/p&gt;
		/// &lt;p&gt;Setting this option to &apos;auto&apos; means that mousedown &lt;i&gt;on the selected cell&lt;/i&gt; starts
		/// editing that cell.&lt;/p&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\grid\EditorGrid.js</definedin>
		[ScriptName("clicksToEdit")]
		public System.Number ClicksToEdit;
		
		/// <summary>True to force validation even if the value is unmodified (defaults to false)</summary>
		/// <definedin>src\widgets\grid\EditorGrid.js</definedin>
		[ScriptName("forceValidation")]
		public bool ForceValidation;
		
		/// <summary>True to automatically HTML encode and decode values pre and post edit (defaults to false)</summary>
		/// <definedin>src\widgets\grid\EditorGrid.js</definedin>
		[ScriptName("autoEncode")]
		public bool AutoEncode;
		
		/// <summary>@hide</summary>
		/// <definedin>src\widgets\grid\EditorGrid.js</definedin>
		[ScriptName("trackMouseOver")]
		public bool TrackMouseOver;
		
		/// <summary>
		/// Any subclass of AbstractSelectionModel that will provide the selection model for
		/// the grid (defaults to {@link Ext.grid.CellSelectionModel} if not specified).
		/// </summary>
		/// <definedin>src\widgets\grid\EditorGrid.js</definedin>
		[ScriptName("selModel")]
		public object SelModel;
		
		/// <summary>Fires before cell editing is triggered. The edit event object has the following properties    grid - This grid  record - The record being edited  field - The field name being edited  value - The value for the field being edited.  row - The grid row index  column - The grid column index  cancel - Set this to true to cancel the edit or return false from your handler.</summary>
		/// <htmlSummary>
		/// Fires before cell editing is triggered. The edit event object has the following properties &lt;br /&gt;
		/// &lt;ul style=&quot;padding:5px;padding-left:16px;&quot;&gt;
		/// &lt;li&gt;grid - This grid&lt;/li&gt;
		/// &lt;li&gt;record - The record being edited&lt;/li&gt;
		/// &lt;li&gt;field - The field name being edited&lt;/li&gt;
		/// &lt;li&gt;value - The value for the field being edited.&lt;/li&gt;
		/// &lt;li&gt;row - The grid row index&lt;/li&gt;
		/// &lt;li&gt;column - The grid column index&lt;/li&gt;
		/// &lt;li&gt;cancel - Set this to true to cancel the edit or return false from your handler.&lt;/li&gt;
		/// &lt;/ul&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\grid\EditorGrid.js</definedin>
		[ScriptName("beforeeditEventName")]
		public const string BeforeeditEventName = "beforeedit";
		
		/// <summary>
		/// Fires after a cell is edited. The edit event object has the following properties    grid - This grid  record - The record being edited  field - The field name being edited  value - The value being set  originalValue - The original value for the field, before the edit.  row - The grid row index  column - The grid column index   
		/// grid.on(&apos;afteredit&apos;, afterEdit, this );
		///
		/// function afterEdit(e) {
		/// // execute an XHR to send/commit data to the server, in callback do (if successful):
		/// e.record.commit();
		/// };
		/// </summary>
		/// <htmlSummary>
		/// Fires after a cell is edited. The edit event object has the following properties &lt;br /&gt;
		/// &lt;ul style=&quot;padding:5px;padding-left:16px;&quot;&gt;
		/// &lt;li&gt;grid - This grid&lt;/li&gt;
		/// &lt;li&gt;record - The record being edited&lt;/li&gt;
		/// &lt;li&gt;field - The field name being edited&lt;/li&gt;
		/// &lt;li&gt;value - The value being set&lt;/li&gt;
		/// &lt;li&gt;originalValue - The original value for the field, before the edit.&lt;/li&gt;
		/// &lt;li&gt;row - The grid row index&lt;/li&gt;
		/// &lt;li&gt;column - The grid column index&lt;/li&gt;
		/// &lt;/ul&gt;
		///
		/// &lt;pre&gt;&lt;code&gt;
		/// grid.on(&apos;afteredit&apos;, afterEdit, this );
		///
		/// function afterEdit(e) {
		/// // execute an XHR to send/commit data to the server, in callback do (if successful):
		/// e.record.commit();
		/// };
		/// &lt;/code&gt;&lt;/pre&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\grid\EditorGrid.js</definedin>
		[ScriptName("aftereditEventName")]
		public const string AftereditEventName = "afteredit";
		
		/// <summary>
		/// Fires after a cell is edited, but before the value is set in the record. Return false
		/// to cancel the change. The edit event object has the following properties    grid - This grid  record - The record being edited  field - The field name being edited  value - The value being set  originalValue - The original value for the field, before the edit.  row - The grid row index  column - The grid column index  cancel - Set this to true to cancel the edit or return false from your handler.  
		/// Usage example showing how to remove the red triangle (dirty record indicator) from some
		/// records (not all). By observing the grid&apos;s validateedit event, it can be cancelled if
		/// the edit occurs on a targeted row (for example) and then setting the field&apos;s new value
		/// in the Record directly:
		/// 
		/// grid.on(&apos;validateedit&apos;, function(e) {
		/// var myTargetRow = 6;
		///
		/// if (e.row == myTargetRow) {
		/// e.cancel = true;
		/// e.record.data[e.field] = e.value;
		/// }
		/// });
		/// </summary>
		/// <htmlSummary>
		/// Fires after a cell is edited, but before the value is set in the record. Return false
		/// to cancel the change. The edit event object has the following properties &lt;br /&gt;
		/// &lt;ul style=&quot;padding:5px;padding-left:16px;&quot;&gt;
		/// &lt;li&gt;grid - This grid&lt;/li&gt;
		/// &lt;li&gt;record - The record being edited&lt;/li&gt;
		/// &lt;li&gt;field - The field name being edited&lt;/li&gt;
		/// &lt;li&gt;value - The value being set&lt;/li&gt;
		/// &lt;li&gt;originalValue - The original value for the field, before the edit.&lt;/li&gt;
		/// &lt;li&gt;row - The grid row index&lt;/li&gt;
		/// &lt;li&gt;column - The grid column index&lt;/li&gt;
		/// &lt;li&gt;cancel - Set this to true to cancel the edit or return false from your handler.&lt;/li&gt;
		/// &lt;/ul&gt;
		/// Usage example showing how to remove the red triangle (dirty record indicator) from some
		/// records (not all). By observing the grid&apos;s validateedit event, it can be cancelled if
		/// the edit occurs on a targeted row (for example) and then setting the field&apos;s new value
		/// in the Record directly:
		/// &lt;pre&gt;&lt;code&gt;
		/// grid.on(&apos;validateedit&apos;, function(e) {
		/// var myTargetRow = 6;
		///
		/// if (e.row == myTargetRow) {
		/// e.cancel = true;
		/// e.record.data[e.field] = e.value;
		/// }
		/// });
		/// &lt;/code&gt;&lt;/pre&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\grid\EditorGrid.js</definedin>
		[ScriptName("validateeditEventName")]
		public const string ValidateeditEventName = "validateedit";
		#endregion
		
		#region Methods
		/// <summary>Starts editing the specified for the specified row/column</summary>
		/// <definedin>src\widgets\grid\EditorGrid.js</definedin>
		/// <param name="rowIndex"></param>
		/// <param name="colIndex"></param>
		[ScriptName("startEditing")]
		public void StartEditing(System.Number rowIndex, System.Number colIndex)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Stops any active editing</summary>
		/// <definedin>src\widgets\grid\EditorGrid.js</definedin>
		/// <param name="cancel">True to cancel any changes</param>
		[ScriptName("stopEditing")]
		public void StopEditing(bool cancel)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Stops any active editing</summary>
		/// <definedin>src\widgets\grid\EditorGrid.js</definedin>
		[ScriptName("stopEditing")]
		public void StopEditing()
		{
			throw new System.Exception("Imported - not implemented");
		}
		#endregion
		
		#region Events
		/// <summary>Fires before cell editing is triggered. The edit event object has the following properties    grid - This grid  record - The record being edited  field - The field name being edited  value - The value for the field being edited.  row - The grid row index  column - The grid column index  cancel - Set this to true to cancel the edit or return false from your handler.</summary>
		/// <htmlSummary>
		/// Fires before cell editing is triggered. The edit event object has the following properties &lt;br /&gt;
		/// &lt;ul style=&quot;padding:5px;padding-left:16px;&quot;&gt;
		/// &lt;li&gt;grid - This grid&lt;/li&gt;
		/// &lt;li&gt;record - The record being edited&lt;/li&gt;
		/// &lt;li&gt;field - The field name being edited&lt;/li&gt;
		/// &lt;li&gt;value - The value for the field being edited.&lt;/li&gt;
		/// &lt;li&gt;row - The grid row index&lt;/li&gt;
		/// &lt;li&gt;column - The grid column index&lt;/li&gt;
		/// &lt;li&gt;cancel - Set this to true to cancel the edit or return false from your handler.&lt;/li&gt;
		/// &lt;/ul&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\grid\EditorGrid.js</definedin>
		[ScriptName("beforeedit")]
		public event ext.auto.Delegate_System_Object Beforeedit;
		
		/// <summary>
		/// Fires after a cell is edited. The edit event object has the following properties    grid - This grid  record - The record being edited  field - The field name being edited  value - The value being set  originalValue - The original value for the field, before the edit.  row - The grid row index  column - The grid column index   
		/// grid.on(&apos;afteredit&apos;, afterEdit, this );
		///
		/// function afterEdit(e) {
		/// // execute an XHR to send/commit data to the server, in callback do (if successful):
		/// e.record.commit();
		/// };
		/// </summary>
		/// <htmlSummary>
		/// Fires after a cell is edited. The edit event object has the following properties &lt;br /&gt;
		/// &lt;ul style=&quot;padding:5px;padding-left:16px;&quot;&gt;
		/// &lt;li&gt;grid - This grid&lt;/li&gt;
		/// &lt;li&gt;record - The record being edited&lt;/li&gt;
		/// &lt;li&gt;field - The field name being edited&lt;/li&gt;
		/// &lt;li&gt;value - The value being set&lt;/li&gt;
		/// &lt;li&gt;originalValue - The original value for the field, before the edit.&lt;/li&gt;
		/// &lt;li&gt;row - The grid row index&lt;/li&gt;
		/// &lt;li&gt;column - The grid column index&lt;/li&gt;
		/// &lt;/ul&gt;
		///
		/// &lt;pre&gt;&lt;code&gt;
		/// grid.on(&apos;afteredit&apos;, afterEdit, this );
		///
		/// function afterEdit(e) {
		/// // execute an XHR to send/commit data to the server, in callback do (if successful):
		/// e.record.commit();
		/// };
		/// &lt;/code&gt;&lt;/pre&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\grid\EditorGrid.js</definedin>
		[ScriptName("afteredit")]
		public event ext.auto.Delegate_System_Object Afteredit;
		
		/// <summary>
		/// Fires after a cell is edited, but before the value is set in the record. Return false
		/// to cancel the change. The edit event object has the following properties    grid - This grid  record - The record being edited  field - The field name being edited  value - The value being set  originalValue - The original value for the field, before the edit.  row - The grid row index  column - The grid column index  cancel - Set this to true to cancel the edit or return false from your handler.  
		/// Usage example showing how to remove the red triangle (dirty record indicator) from some
		/// records (not all). By observing the grid&apos;s validateedit event, it can be cancelled if
		/// the edit occurs on a targeted row (for example) and then setting the field&apos;s new value
		/// in the Record directly:
		/// 
		/// grid.on(&apos;validateedit&apos;, function(e) {
		/// var myTargetRow = 6;
		///
		/// if (e.row == myTargetRow) {
		/// e.cancel = true;
		/// e.record.data[e.field] = e.value;
		/// }
		/// });
		/// </summary>
		/// <htmlSummary>
		/// Fires after a cell is edited, but before the value is set in the record. Return false
		/// to cancel the change. The edit event object has the following properties &lt;br /&gt;
		/// &lt;ul style=&quot;padding:5px;padding-left:16px;&quot;&gt;
		/// &lt;li&gt;grid - This grid&lt;/li&gt;
		/// &lt;li&gt;record - The record being edited&lt;/li&gt;
		/// &lt;li&gt;field - The field name being edited&lt;/li&gt;
		/// &lt;li&gt;value - The value being set&lt;/li&gt;
		/// &lt;li&gt;originalValue - The original value for the field, before the edit.&lt;/li&gt;
		/// &lt;li&gt;row - The grid row index&lt;/li&gt;
		/// &lt;li&gt;column - The grid column index&lt;/li&gt;
		/// &lt;li&gt;cancel - Set this to true to cancel the edit or return false from your handler.&lt;/li&gt;
		/// &lt;/ul&gt;
		/// Usage example showing how to remove the red triangle (dirty record indicator) from some
		/// records (not all). By observing the grid&apos;s validateedit event, it can be cancelled if
		/// the edit occurs on a targeted row (for example) and then setting the field&apos;s new value
		/// in the Record directly:
		/// &lt;pre&gt;&lt;code&gt;
		/// grid.on(&apos;validateedit&apos;, function(e) {
		/// var myTargetRow = 6;
		///
		/// if (e.row == myTargetRow) {
		/// e.cancel = true;
		/// e.record.data[e.field] = e.value;
		/// }
		/// });
		/// &lt;/code&gt;&lt;/pre&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\grid\EditorGrid.js</definedin>
		[ScriptName("validateedit")]
		public event ext.auto.Delegate_System_Object Validateedit;
		#endregion
	}
}
